/**
 * Project Name:JavaBaseReview
 * Package Name:com.xuwei.ext.design_pattern.observer
 * author:David
 * Date:2016年5月11日下午5:40:41
 * Copyright (c) 2016, xw123box@126.com All Rights Reserved.
 *
 */
package com.xuwei.ext.design_pattern.observer;

/**
 * @author David
 * @since 2016年5月11日 下午5:40:41
 * @version 
 * @since JDK 1.6
 */
public class ObserverPatternDemo {

	public static void main(String[] args) {
		Subject subject = new Subject();
		new HexaObserver(subject);
		new OctalObserver(subject);
		new BinaryObserver(subject);
		
		System.out.println("First state change:15");
		subject.setState(15);
		System.out.println("Second state change:10");
		subject.setState(10);
	}
	
}
